package com.tedu.day9.lambda;

import java.util.Arrays;

public class TestArraySort {
    public static void main(String[] args) {
        int[] arr = {3,2,6,9,7,5,4,1};
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
        Integer[] arr1 = {3,2,6,9,7,5,4,1};
        Arrays.sort(arr1, (Integer o,Integer o1) ->{
                return o1.intValue() - o.intValue();
        });
        System.out.println(Arrays.toString(arr1));
    }
}
